using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using MS.Core.Base.Data;

namespace LHS.Core.TableInfo.SetUpCaseRecordForm
{
    public class CaseRecord_TreeInfo
    {
        public const String CRT_ID = "CRT_ID";
        public const String CRT_PARENTID = "CRT_ParentID";
        public const String CRT_NAME = "CRT_Name";
        public const String CRT_DESCRIPTION = "CRT_Description";        
        public const String CRT_ISLEAF = "CRT_IsLeaf";
        public const String CRT_ISUSED = "CRT_IsUsed";
        public const String CRT_LEVEL = "CRT_Level";
        public const String CRT_BUILDORDER = "CRT_BuildOrder";
        public const String CRC_ID = "CRC_ID";

        public const String TABLENAME = "CaseRecord_Tree";

        public static DataTable GetStructure()
        {
            DataTable dtReturn = new DataTable();
            dtReturn.TableName = TABLENAME;
            dtReturn.Columns.Add(CRT_ID, typeof(String));
            dtReturn.Columns.Add(CRT_PARENTID, typeof(String));
            dtReturn.Columns.Add(CRT_NAME, typeof(String));
            dtReturn.Columns.Add(CRT_DESCRIPTION, typeof(String));           
            dtReturn.Columns.Add(CRT_ISLEAF, typeof(String));
            dtReturn.Columns.Add(CRT_ISUSED, typeof(String));
            dtReturn.Columns.Add(CRT_LEVEL, typeof(int));
            dtReturn.Columns.Add(CRT_BUILDORDER, typeof(int));
            dtReturn.Columns.Add(CRC_ID, typeof(int));
            dtReturn.Columns.Add(DBBaseInfo.Hidden_Status, typeof(int));

            return dtReturn;
        }

        public static String[] GetKey()
        {
            return new String[] { CRT_ID };
        }
    }
}
